import React, {Component} from 'react';

class Child extends Component {

  render() {
    const {news: {title, publisher, like_count, id}} = this.props
    return (
      <div className="child">
        <h3>{title}</h3>
        <div className="detail">
          <span>{publisher}</span>
          <span>{like_count}点赞</span>
          <span onClick={this.props.addLike(id)}>点赞+1</span>
        </div>
      </div>
    );
  }
}


export default Child;
